package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.model.SUser;
import cn.huiyunche.base.service.model.SUserSubUser;

import java.util.List;

/**
 * The interface S user sub user service.
 *
 * @FileName: cn.huiyunche.service.base.interfaces
 * @Description: 用户下属用户
 * @author: Aaron
 * @date: 2016 /12/7 下午5:20
 */
public interface SUserSubUserService {

    /**
     * Gets users by user id and type.
     *
     * @param userId   the user id
     * @param userType the user type
     * @return the users by user id and type
     */
    List<SUser> getUsersByUserIdAndType(Long userId, Integer userType);

    /**
     * Gets user ids by user id and type.
     *
     * @param userId   the user id
     * @param userType the user type
     * @return the user ids by user id and type
     */
    List<Long> getUserIdsByUserIdAndType(Long userId, Integer userType);

    public int insertSelective(SUserSubUser sUserSubUser);

    public int deleteBySubUserId(Long subUserId);

    /**
     * 校验当前登录用户对下属用户的操作是否合理
     *
     * @param currentUserId
     * @param sUserId
     * @return
     */
    public boolean validCurrentUserEqualSuserId(Long currentUserId, Long sUserId);
}
